<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<xs:schema xmlns:zj="http://www.zju.edu.cn" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.zju.edu.cn" elementFormDefault="qualified">
  <xs:import schemaLocation="Module.xsd"/>
  <xs:element name="Module">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="Title" type="xs:string"/>
        <xs:element ref="zj:DataSet"/>
        <xs:element ref="zj:Extension" minOccurs="0"/>
        <xs:element name="PageSize" type="xs:unsignedInt" minOccurs="0"/>
        <xs:element ref="zj:TabSheets" minOccurs="0"/>
        <xs:element ref="zj:FilterSQL" minOccurs="0"/>
        <xs:element ref="zj:DisablePage" minOccurs="0"/>
        <xs:element ref="zj:DefaultOrder" minOccurs="0"/>
        <xs:element name="DefaultSortField" type="xs:byte" minOccurs="0"/>
        <xs:element ref="zj:FunctionRight" minOccurs="0"/>
        <xs:element ref="zj:Resolvers"/>
        <xs:element ref="zj:Relations" minOccurs="0"/>
        <xs:element ref="zj:XsltFiles" minOccurs="0"/>
        <xs:element ref="zj:DefaultPage" minOccurs="0"/>
      </xs:sequence>
      <xs:attribute name="HttpPost" type="xs:boolean"/>
      <xs:attribute name="SupportData" type="xs:boolean"/>
      <xs:attribute name="Prompt" type="xs:boolean"/>
      <xs:attribute name="SortQuery" type="xs:boolean"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="DataSet">
    <xs:simpleType>
      <xs:restriction base="xs:NMTOKEN">
        <xs:enumeration value="Single2"/>
        <xs:enumeration value="SingleDList2"/>
        <xs:enumeration value="List2"/>
        <xs:enumeration value="ListDetail2"/>
        <xs:enumeration value="MasterDetail2"/>
        <xs:enumeration value="MultipleMasterDetail2"/>
        <xs:enumeration value="Multiple2"/>
        <xs:enumeration value="MultipleDList2"/>
        <xs:enumeration value="AllRow2"/>
        <xs:enumeration value="Config2"/>
        <xs:enumeration value="Tree2"/>
        <xs:enumeration value="MultipleMasterDetailTree2"/>
      </xs:restriction>
    </xs:simpleType>
  </xs:element>
  <xs:element name="Extension">
    <xs:complexType mixed="true">
      <xs:complexContent mixed="true">
        <xs:restriction base="xs:anyType"/>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>
  <xs:element name="TabSheets">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="zj:TabSheet" maxOccurs="unbounded"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="TabSheet">
    <xs:complexType mixed="true">
      <xs:choice minOccurs="0" maxOccurs="unbounded"/>
      <xs:attribute name="ID" type="xs:ID" use="required"/>
      <xs:attribute name="Title" type="xs:string" use="required"/>
      <xs:attribute name="NeedParse" type="xs:boolean"/>
      <xs:attribute name="SQLInject" type="xs:boolean"/>
      <xs:attribute name="EmptyMarco" type="xs:string"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="FilterSQL">
    <xs:complexType mixed="true">
      <xs:choice minOccurs="0" maxOccurs="unbounded"/>
      <xs:attribute name="NeedParse" type="xs:boolean"/>
      <xs:attribute name="SQLInject" type="xs:boolean"/>
      <xs:attribute name="EmptyMarco" type="xs:string"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="OrderBy">
    <xs:complexType mixed="true">
      <xs:choice minOccurs="0" maxOccurs="unbounded"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="DisablePage">
    <xs:simpleType>
      <xs:restriction base="xs:string">
        <xs:pattern value="(Insert|Update|Delete|List|Detail)((\|)(Insert|Update|Delete|List|Detail))*"/>
      </xs:restriction>
    </xs:simpleType>
  </xs:element>
  <xs:element name="DefaultOrder">
    <xs:simpleType>
      <xs:restriction base="xs:string">
        <xs:enumeration value="ASC"/>
        <xs:enumeration value="DESC"/>
      </xs:restriction>
    </xs:simpleType>
  </xs:element>
  <xs:element name="FunctionRight">
    <xs:complexType>
      <xs:sequence minOccurs="0" maxOccurs="unbounded">
        <xs:element ref="zj:SubFunctionRight"/>
      </xs:sequence>
      <xs:attribute name="FunctionKey" type="xs:string" use="required"/>
      <xs:attribute name="FuncType" use="required">
        <xs:simpleType>
          <xs:restriction base="xs:NMTOKEN">
            <xs:enumeration value="None"/>
            <xs:enumeration value="SubFunction"/>
            <xs:enumeration value="Admin"/>
            <xs:enumeration value="Function"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="SubFunctionRight">
    <xs:complexType>
      <xs:complexContent>
        <xs:restriction base="xs:anyType">
          <xs:attribute name="PageStyle" use="required">
            <xs:simpleType>
              <xs:restriction base="xs:NMTOKEN">
                <xs:enumeration value="Detail"/>
                <xs:enumeration value="List"/>
                <xs:enumeration value="Custom"/>
                <xs:enumeration value="Insert"/>
                <xs:enumeration value="Delete"/>
                <xs:enumeration value="Update"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:attribute>
          <xs:attribute name="Operation" type="xs:string"/>
          <xs:attribute name="SubFunctionKey" type="xs:string" use="required"/>
        </xs:restriction>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>
  <xs:element name="Resolvers">
    <xs:complexType>
      <xs:sequence maxOccurs="unbounded">
        <xs:element ref="zj:Resolver"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="Resolver">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="RegName" type="xs:string"/>
        <xs:element name="Xml" type="xs:string"/>
        <xs:element ref="zj:DataRight" minOccurs="0"/>
        <xs:element ref="zj:InsertAction" minOccurs="0"/>
        <xs:element ref="zj:UpdateAction" minOccurs="0"/>
        <xs:element ref="zj:DetailAction" minOccurs="0"/>
        <xs:element ref="zj:ListAction" minOccurs="0"/>
        <xs:element ref="zj:ListRefParams" minOccurs="0" maxOccurs="unbounded"/>
      </xs:sequence>
      <xs:attribute name="Style" use="required">
        <xs:simpleType>
          <xs:restriction base="xs:NMTOKEN">
            <xs:enumeration value="FixTable"/>
            <xs:enumeration value="None"/>
            <xs:enumeration value="Table"/>
            <xs:enumeration value="Normal"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="List" type="xs:boolean"/>
      <xs:attribute name="DetailList" type="xs:boolean"/>
      <xs:attribute name="Type">
        <xs:simpleType>
          <xs:restriction base="xs:NMTOKEN">
            <xs:enumeration value="View"/>
            <xs:enumeration value="Table"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="Source" type="xs:string"/>
      <xs:attribute name="Main" type="xs:boolean"/>
      <xs:attribute name="Order" type="xs:string"/>
      <xs:attribute name="CreateType">
        <xs:simpleType>
          <xs:restriction base="xs:NMTOKEN">
            <xs:enumeration value="RegName"/>
            <xs:enumeration value="Xml"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="Expand" type="xs:boolean"/>
      <xs:attribute name="TableName" type="xs:string"/>
      <xs:attribute name="TableDesc" type="xs:string"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="DataRight">
    <xs:complexType>
      <xs:complexContent>
        <xs:restriction base="xs:anyType">
          <xs:attribute name="RightType" type="xs:string"/>
          <xs:attribute name="OwnerField" type="xs:string" use="required"/>
        </xs:restriction>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>
  <xs:element name="InsertAction">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="Add" minOccurs="0"/>
        <xs:element ref="Override" minOccurs="0"/>
        <xs:element ref="Except" minOccurs="0"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="UpdateAction">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="Add" minOccurs="0"/>
        <xs:element ref="Override" minOccurs="0"/>
        <xs:element ref="Except" minOccurs="0"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="DetailAction">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="Add" minOccurs="0"/>
        <xs:element ref="Override" minOccurs="0"/>
        <xs:element ref="Except" minOccurs="0"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="ListAction">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="Add" minOccurs="0"/>
        <xs:element ref="Override" minOccurs="0"/>
        <xs:element ref="Except" minOccurs="0"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="ListRefParams">
    <xs:complexType>
      <xs:complexContent>
        <xs:restriction base="xs:anyType">
          <xs:attribute name="Name" type="xs:string" use="required"/>
          <xs:attribute name="Value" type="xs:string"/>
          <xs:attribute name="TableName" type="xs:string"/>
          <xs:attribute name="FieldName" type="xs:string"/>
        </xs:restriction>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>
  <xs:element name="Relations">
    <xs:complexType>
      <xs:sequence maxOccurs="unbounded">
        <xs:element ref="zj:Relation"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="Relation">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="MasterResolver" type="xs:string"/>
        <xs:element name="DetailResolver" type="xs:string"/>
        <xs:element name="MasterField" type="xs:string"/>
        <xs:element name="DetailField" type="xs:string"/>
        <xs:element ref="zj:FilterSQL" minOccurs="0"/>
        <xs:element ref="zj:OrderBy" minOccurs="0"/>
      </xs:sequence>
      <xs:attribute name="Type">
        <xs:simpleType>
          <xs:restriction base="xs:NMTOKEN">
            <xs:enumeration value="DetailValue"/>
            <xs:enumeration value="DetailRelation"/>
            <xs:enumeration value="MasterValue"/>
            <xs:enumeration value="MasterRelation"/>
            <xs:enumeration value="OnlyFill"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="XsltFiles">
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="zj:XsltFile" minOccurs="0" maxOccurs="unbounded"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="XsltFile">
    <xs:complexType mixed="true">
      <xs:choice minOccurs="0" maxOccurs="unbounded"/>
      <xs:attribute name="Type" use="required">
        <xs:simpleType>
          <xs:restriction base="xs:NMTOKEN">
            <xs:enumeration value="Detail"/>
            <xs:enumeration value="List"/>
            <xs:enumeration value="Custom"/>
            <xs:enumeration value="Insert"/>
            <xs:enumeration value="Update"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="Operation" type="xs:string"/>
      <xs:attribute name="SupportLogin" type="xs:boolean"/>
      <xs:attribute name="CheckSubmit" type="xs:boolean"/>
      <xs:attribute name="SupportDoubleTransfrom" type="xs:boolean"/>
      <xs:attribute name="TransformAll" type="xs:string"/>
      <xs:attribute name="DataXslt" type="xs:string"/>
      <xs:attribute name="DefaultXsltTemplate" type="xs:string"/>
    </xs:complexType>
  </xs:element>
  <xs:element name="DefaultPage">
    <xs:complexType>
      <xs:sequence maxOccurs="unbounded">
        <xs:element ref="zj:DefaultItem"/>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="DefaultItem">
    <xs:complexType mixed="true">
      <xs:choice minOccurs="0" maxOccurs="unbounded"/>
      <xs:attribute name="Source" use="required">
        <xs:simpleType>
          <xs:restriction base="xs:NMTOKEN">
            <xs:enumeration value="Detail"/>
            <xs:enumeration value="List"/>
            <xs:enumeration value="Insert"/>
            <xs:enumeration value="Delete"/>
            <xs:enumeration value="Update"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="Dest" use="required">
        <xs:simpleType>
          <xs:restriction base="xs:NMTOKEN">
            <xs:enumeration value="Detail"/>
            <xs:enumeration value="List"/>
            <xs:enumeration value="Custom"/>
            <xs:enumeration value="Insert"/>
            <xs:enumeration value="Update"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="IsPost" type="xs:boolean" use="required"/>
      <xs:attribute name="NeedParse" type="xs:boolean"/>
      <xs:attribute name="Prompt" type="xs:string"/>
    </xs:complexType>
  </xs:element>
</xs:schema>
